using System.ComponentModel.DataAnnotations;

namespace Mark.Models;

/// <summary>
/// AI提供商实体
/// </summary>
public class Provider : BaseEntity
{
    [Required]
    [MaxLength(100)]
    public string Name { get; set; } = string.Empty;
    
    [MaxLength(200)]
    public string? DisplayName { get; set; }
    
    [MaxLength(500)]
    public string? Description { get; set; }
    
    [Required]
    [MaxLength(500)]
    public string BaseUrl { get; set; } = string.Empty;
    
    /// <summary>
    /// API密钥（加密存储）
    /// </summary>
    [MaxLength(500)]
    public string? ApiKey { get; set; }
    
    /// <summary>
    /// 提供商配置 (JSON)
    /// </summary>
    public string? Config { get; set; }
    
    /// <summary>
    /// 提供商状态：Active, Inactive, Error
    /// </summary>
    [MaxLength(20)]
    public string Status { get; set; } = "Active";
    
    /// <summary>
    /// 支持的功能：Chat, Completion, Embedding, etc.
    /// </summary>
    [MaxLength(500)]
    public string? SupportedFeatures { get; set; }
    
    /// <summary>
    /// 排序优先级
    /// </summary>
    public int Priority { get; set; } = 0;
    
    // 导航属性
    public virtual ICollection<Model> Models { get; set; } = new List<Model>();
} 